#include "Parser.h"
#include "StatusCode.h"

using namespace std;

int main( int argc, char* argv[] )
{
  string filename("XML/Eldarion.xml");

  if ( argc > 1 )
    filename = string( argv[1] );

  Parser test( filename.c_str() );

  test.setLevel( INFO, 0 );

  StatusCode sc(test.chargerFichier());

  if ( sc )
    {
      cout << "Fichier lu" << endl;
      cout << sc.valeur() << " lignes lues" << endl;
    }
  else
    cout << sc.message() << endl;

  sc = test.lireDocument();

  cout << endl;

  map< string, string > infos;

  test.getInformations( infos );

  map< string, string >::const_iterator it, Begin( infos.begin() ),
    End( infos.end() );

  // for ( it = Begin; it != End; it++)
  //   cout << it -> first << " -> " << it -> second << endl;

  return 0;
}
